API documentation

Processing classes

class fpd_live_imaging.process_classes.DataProcessingBase(name, output_queue, process_variables=[])
clear_queues()
start_process_function()
stop_running()
class fpd_live_imaging.process_classes.FullDiffractionImageProcess(name, output_queue, process_variables=[])
class fpd_live_imaging.process_classes.DiffractionImageRollingProcess(*args, **kwds)
frames_to_average
reset()
class fpd_live_imaging.process_classes.FullDiffractionThresholdedImageProcess(*args, **kwds)
class fpd_live_imaging.process_classes.BFDetectorProcess(name, output_queue, process_variables=[])
process_function(diffraction_image)
class fpd_live_imaging.process_classes.ADFDetectorProcess(*args, **kwds)
centreX
centreY
generate_adf_detector(centerX, centerY, radius0, radius1, imageSizeX=256, imageSizeY=256)
process_function(diffraction_image)
radius0
radius1
class fpd_live_imaging.process_classes.SegmentedProcess(*args, **kwds)
angle
centreX
centreY
generate_segmented_detector(centreX, centreY, radius0, radius1, angle, imageSizeX=256, imageSizeY=256)
process_function(diffraction_image)
radius0
radius1
class fpd_live_imaging.process_classes.SinglePixelProcess(name, output_queue, process_variables=[])
process_function(diffraction_image)
class fpd_live_imaging.process_classes.CoMxProcess(name, output_queue, process_variables=[])
process_function(diffraction_image)
class fpd_live_imaging.process_classes.CoMyProcess(name, output_queue, process_variables=[])
process_function(diffraction_image)
class fpd_live_imaging.process_classes.CoMxThresholdProcess(*args, **kwds)
process_function(diffraction_image)
class fpd_live_imaging.process_classes.CoMyThresholdProcess(*args, **kwds)
process_function(diffraction_image)
class fpd_live_imaging.process_classes.CoMxMaskDiskProcess(name, output_queue, process_variables=[])
process_function(diffraction_image)
class fpd_live_imaging.process_classes.CoMyMaskDiskProcess(name, output_queue, process_variables=[])
process_function(diffraction_image)

Data reading

class fpd_live_imaging.receive_data_medipix_class.ReceiveDataMedipix(ip_address='127.0.0.1', port=6342)
bit_mode
frame_bytesize
frame_dtype
frame_size
start_receive_detector_data_listening_process()
startacquisition()
stop_running()

Acquisition control

class fpd_live_imaging.acquisition_control_class.AcquisitionControlBase(data_send_ip='127.0.0.1', debug=False)
cancel_all_processes()
cancel_process(name)
change_brightness_contrast(process_name, brightness, contrast)
clear_all_queues()
minus_one_pixel_to_scan_postition()
plus_one_pixel_to_scan_postition()
reset_autolim_scanning()
resize_scan(x, y)
restart_scan()
start_adf_process(name='ADF0')
start_bf_process(name='BF0')
start_com_x_threshold_process(name='CoMxT')
start_com_y_threshold_process(name='CoMyT')
start_full_diffraction_image_process(name='Diffraction')
start_full_diffraction_thresholded_image_process(name='DiffractionThresholded')
start_medipix_receiver()
start_segmented_process_process(name='Segment0')
class fpd_live_imaging.acquisition_control_class.LiveImagingDM(data_send_ip='127.0.0.1', *args, **kwds)
class fpd_live_imaging.acquisition_control_class.LiveImagingQt(data_send_ip='127.0.0.1', debug=False)
class fpd_live_imaging.acquisition_control_class.DummyAcquisition(data_send_ip='127.0.0.1', debug=False)
class DummyComm(name='')
start_data_listening()
stop_running()

Visualization

class fpd_live_imaging.live_qt_visualization.DataView
draw_detector_circle(image, x, y, r, color='black')
draw_detector_number(image, x, y, value, color='red')
initUI()
make_lower_button_bar()
make_upper_button_bar()
update_image(imagedata, plot_number=None)
class fpd_live_imaging.live_qt_visualization.DataViewParallel(input_queue, name, annotation_array)
Parameters:
  • input_queue (multiprocessing queue) –
  • name (string) –
  • annotation_array (multiprocessing array) –

Examples

>>> import multiprocess as mp
>>> from PyQt5.QtWidgets import QApplication
>>> from fpd_live_imaging.live_qt_visualization import DataViewParallel
>>> app = QApplication(sys.argv)
>>> dataview = DataViewParallel(mp.Queue(), "test", mp.Array('i', 4))
update_data()
class fpd_live_imaging.live_qt_visualization.DataViewScanning(input_queue, restart_scan_flag, plus_one_pixel_to_scan_position, minus_one_pixel_to_scan_position, reset_autolim_flag, clim_min, clim_max, auto_clim, size_x, size_y, name)
auto_clim
clim_max
clim_min
make_lower_button_bar()
make_upper_button_bar()
size_x
size_y
update_data()